<div class="bread">
	<ul class="br">
		<li class="home"><a
			href="<?php echo URLUltil::adminPage($this->getContext());?>">DashBoard</a></li>
		<li><a href="#"><?php echo $this->getControllerName()?> Manager</a></li>
		<li><span>List</span></li>
	</ul>
</div>
<?php $this->viewMessage();
?>
<div class="formdata condition">
	<form class="form">
	<div class="ctr-frame">
		<div class="left">
		<?php
		$this->renderPage();
		$this->renderSize();
		$this->renderOrderBy();
		$this->renderOrderAs();
		$this->textbox("id", "r0");
		$this->textbox("name", "r1");
		?>
		</div>
		<div class="right">
		<?php 
		$this->combobox("newscat",$this->viewBag['newsCat'], "r0");
		?>
		</div>
	</div>
	<div class="bt-frame">
	<?php 
	$this->buttonSearch();
	?>
	</div>
	</form>
</div>

<div class="tabledata">
	<table class="tgrid">
		<thead>
			<tr>
				<th class="ordinal">#</th>
				<th class="checkbox"><input type="checkbox" name="checkall"></th>
				<th sortmember="image">Hình ảnh</th>
				<th sortmember="name">Tên</th>
				<th sortmember="hit">Lượt xem</th>
				<th sortmember="catname">Danh mục</th>
				<th sortmember="statusname">Trạng thái</th>
				<th sortmember="id">ID</th>
			</tr>
		</thead>
		<tbody>
		<?php 
		if(isset($this->searchResults)){
		$order = 1;
			foreach ($this->searchResults[Constant::RESULTS] as $value) {
				$class = "";
				if($order % 2 == 0) $class = ' class="focus"';
				echo '<tr'.$class.'>';
					echo '<td class="ordinal">'.$order.'</th>';
					echo '<td class="checkbox"><input type="checkbox" name="News_'.$value[News::ID].'"></td>';
					echo '<td><a target="_blank" href="'.URLUltil::newsDetails1($this->getContext(), $value[News::ID], $value[News::NAME], $value[News::CATNAME]).'"><img class="tb-row" src="'.$this->imageURL($value[News::IMAGE]).'"></a></td>';
					echo '<td sortmember="name"><a href="'.URLUltil::newsLink($this->getContext(), $value[News::ID]).'">'.$value[News::NAME].'</a></td>';
					echo '<td sortmember="hit">'.$value[News::HIT].'</td>';
					echo '<td sortmember="catname">'.$value[News::CATNAME].'</td>';
					echo '<td sortmember="statusname">'.$value[News::STATUSNAME].'</td>';
					echo '<td sortmember="id">'.$value[News::ID].'</td>';
				echo '</tr>';
				$order++;
			}
		}?>
		</tbody>
		<tfoot>
			<tr class="pagenav">
				<td colspan="11">
					<?php $this->renderSearchFoorter($this->searchResults)?>
				</td>
			</tr>
		</tfoot>
</table>
</div>